package edu.citadel.domain;

import edu.citadel.db.EmployeeCompensationDao;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;

import java.util.Date;

/**
 * User: jordan
 * Date: 3/10/13
 * Time: 3:07 PM
 */
@Configurable(autowire = Autowire.BY_TYPE)
public class EmployeeCompensation {
    @Autowired
    private EmployeeCompensationDao employeeCompensationDao;
    private Date clockIn;
    private Date clockOut;
    private boolean paid;
    private int workItemId;
    private int employeeId;

    public EmployeeCompensation(int workItemId, int employeeId) {
        this.workItemId = workItemId;
        this.employeeId = employeeId;
    }

    public int getWorkItemId() {
        return workItemId;
    }

    public void setWorkItemId(int workItemId) {
        this.workItemId = workItemId;
    }

    public int getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(int employeeId) {
        this.employeeId = employeeId;
    }

    public String getPaid() {
        return (paid) ? "Y" : "N";
    }

    public void setPaid(String paid) {
        this.paid = "Y".equals(paid);
    }

    public Date getClockIn() {
        return clockIn;
    }

    public void setClockIn(Date clockIn) {
        this.clockIn = clockIn;
    }

    public Date getClockOut() {
        return clockOut;
    }

    public void setClockOut(Date clockOut) {
        this.clockOut = clockOut;
    }

    public boolean isPaid() {
        return paid;
    }

    public void setPaid(boolean paid) {
        this.paid = paid;
    }

    public void setEmployeeCompensationDao(EmployeeCompensationDao employeeCompensationDao) {
        this.employeeCompensationDao = employeeCompensationDao;
    }
}
